<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简单的HTML页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .container {
            background-color: #ffee00;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            text-align: center;
        }
        h1 {
            color: #333;
        }
        p {
            color: #666;
        }
    </style>
</head>
<body>
<div class="container">
    <button type="button" onclick="openHmPhoto()">点击打开相册</button>
    <img id="myImg" style="width:100px;height:100px">
    <div id="showImgUrl"></div>
</div>
</body>

<script>
    function openHmPhoto() {
        //调用鸿蒙的业务方法
        var url = window.xiaozhang.openPhoto()
<!--        document.querySelector("#myImg").src = url-->
<!--        document.querySelector("#showImgUrl").innerHTML = url-->
    }

    function setPhotoUrl(url) {
        document.querySelector("#myImg").src = url
    }

</script>
</html>